package es.udc.pfc.davidparedes.model.userservice;

import java.util.Calendar;
import java.util.List;

import es.udc.pfc.davidparedes.model.admin.Admin;
import es.udc.pfc.davidparedes.model.director.Director;
import es.udc.pfc.davidparedes.model.receptionist.Receptionist;
import es.udc.pfc.davidparedes.model.universemanager.UniverseManager;
import es.udc.pfc.davidparedes.model.userprofile.UserProfile;
import es.udc.pfc.davidparedes.model.util.DuplicateInstanceException;
import es.udc.pfc.davidparedes.model.util.InstanceNotFoundException;
import es.udc.pfc.davidparedes.model.vendor.Vendor;

public interface UserService {
    
    public Receptionist registerReceptionist(String loginName, String clearPassword,
            UserProfileDetails userProfileDetails, Calendar contractTermination)
            throws DuplicateInstanceException, InstanceNotFoundException;
    
    public void updateReceptionist(Long userProfileId, String firstName,
    		String lastName, String email, String nif, Calendar contractTermination)
    		throws InstanceNotFoundException;
    
    public void deactivateReceptionist(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public Vendor registerVendor(String loginName, String clearPassword,
            UserProfileDetails userProfileDetails, Calendar contractTermination,
            int baseHours, Long universeId)
            throws DuplicateInstanceException, InstanceNotFoundException;
    
    public void updateVendor(Long userProfileId, String firstName,
    		String lastName, String email, String nif, Calendar contractTermination,
            int baseHours)
            throws InstanceNotFoundException;
    
    public void deactivateVendor(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public UniverseManager registerUniverseManager(String loginName, String clearPassword,
            UserProfileDetails userProfileDetails, Calendar contractTermination)
            throws DuplicateInstanceException, InstanceNotFoundException;
    
    public void updateUniverseManager(Long userProfileId, String firstName,
    		String lastName, String email, String nif, Calendar contractTermination)
            throws InstanceNotFoundException;
    
    public void deactivateUniverseManager(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public Director registerDirector(String loginName, String clearPassword,
            UserProfileDetails userProfileDetails)
            throws DuplicateInstanceException, InstanceNotFoundException;
    
    public void updateDirector(Long userProfileId, String firstName,
    		String lastName, String email, String nif)
            throws InstanceNotFoundException;
    
    public void deactivateDirector(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public UserProfile login(String loginName, String password,
            boolean passwordIsEncrypted) throws InstanceNotFoundException,
            IncorrectPasswordException, ExpiredContractException;

    public UserProfile findUserProfile(Long userProfileId)
            throws InstanceNotFoundException;
    
    public Receptionist findReceptionist(Long userProfileId)
            throws InstanceNotFoundException;
    
    public Vendor findVendor(Long userProfileId)
            throws InstanceNotFoundException;
    
    public UniverseManager findUniverseManager(Long userProfileId)
            throws InstanceNotFoundException;
    
    public Director findDirector(Long userProfileId)
            throws InstanceNotFoundException;
    
    public Admin findAdmin(Long userProfileId)
            throws InstanceNotFoundException;

    public void updateUserProfileDetails(Long userProfileId,
            UserProfileDetails userProfileDetails)
            throws InstanceNotFoundException;
    
    public void changePassword(Long userProfileId, String oldClearPassword,
            String newClearPassword) throws IncorrectPasswordException,
            InstanceNotFoundException;
    
    public boolean moveVendor(Long vendorId, Long universeId)
    		throws InstanceNotFoundException;
    
    public boolean moveUniverseManager(Long managerId, Long universeId)
    		throws InstanceNotFoundException;
    
    public Long[] getManagerStats(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public List<VendorUniverseStatsDTO> getVendorTasksStats(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public List<VendorRowStatsDTO> getVendorMissionsStats(Long userProfileId)
    		throws InstanceNotFoundException;
    
    public float numOfWeeksMonth();
    
    public float numOfWeeksTrimester();

}
